package com.zt.ztzx.controller;

import com.zt.ztzx.model.entity.device.DeviceType;
import com.zt.ztzx.model.vo.common.Result;
import com.zt.ztzx.service.DeviceTypeService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("type")
public class TypeController {

    @Autowired
    private DeviceTypeService deviceTypeService;

    @GetMapping("/list")
    @Operation(summary = "设备分类列表", description = "设备分类列表",method = "list方法")
    public Result<List<DeviceType>> list(){
        return Result.build(deviceTypeService.list(),200,"查询成功");
    }
}
